home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / PInterfaces / Lists.p < prev    next >
Encoding:
Text File  |  1989-10-13  |  4.2 KB  |  155 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Friday, October 21, 1988 at 3:31 AM
  3.     Lists.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.     Copyright Apple Computer, Inc.    1985-1988
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Lists;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingLists}
  21. {$SETC UsingLists := 1}
  22.  
  23. {$I+}
  24. {$SETC ListsIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingControls}
  30. {$I $$Shell(PInterfaces)Controls.p}
  31. {$ENDC}
  32. {$IFC UNDEFINED UsingMemory}
  33. {$I $$Shell(PInterfaces)Memory.p}
  34. {$ENDC}
  35. {$SETC UsingIncludes := ListsIncludes}
  36.  
  37. CONST
  38. lDoVAutoscroll = 2;
  39. lDoHAutoscroll = 1;
  40. lOnlyOne = -128;
  41. lExtendDrag = 64;
  42. lNoDisjoint = 32;
  43. lNoExtend = 16;
  44. lNoRect = 8;
  45. lUseSense = 4;
  46. lNoNilHilite = 2;
  47. lInitMsg = 0;
  48. lDrawMsg = 1;
  49. lHiliteMsg = 2;
  50. lCloseMsg = 3;
  51.  
  52.  
  53. TYPE
  54.  
  55.  
  56. Cell = Point;
  57.  
  58. DataPtr = ^DataArray;
  59. DataHandle = ^DataPtr;
  60.  
  61. DataArray = PACKED ARRAY [0..32000] OF CHAR;
  62.  
  63. ListPtr = ^ListRec;
  64. ListHandle = ^ListPtr;
  65. ListRec = RECORD
  66.     rView: Rect;
  67.     port: GrafPtr;
  68.     indent: Point;
  69.     cellSize: Point;
  70.     visible: Rect;
  71.     vScroll: ControlHandle;
  72.     hScroll: ControlHandle;
  73.     selFlags: SignedByte;
  74.     lActive: BOOLEAN;
  75.     lReserved: SignedByte;
  76.     listFlags: SignedByte;
  77.     clikTime: LONGINT;
  78.     clikLoc: Point;
  79.     mouseLoc: Point;
  80.     lClikLoop: ProcPtr;
  81.     lastClick: Cell;
  82.     refCon: LONGINT;
  83.     listDefProc: Handle;
  84.     userHandle: Handle;
  85.     dataBounds: Rect;
  86.     cells: DataHandle;
  87.     maxIndex: INTEGER;
  88.     cellArray: ARRAY [1..1] OF INTEGER;
  89.     END;
  90.  
  91.  
  92.  
  93. FUNCTION LNew(rView: Rect;dataBounds: Rect;cSize: Point;theProc: INTEGER;
  94.     theWindow: WindowPtr;drawIt: BOOLEAN;hasGrow: BOOLEAN;scrollHoriz: BOOLEAN;
  95.     scrollVert: BOOLEAN): ListHandle;
  96.     INLINE $3F3C,$0044,$A9E7;
  97. PROCEDURE LDispose(lHandle: ListHandle);
  98.     INLINE $3F3C,$0028,$A9E7;
  99. FUNCTION LAddColumn(count: INTEGER;colNum: INTEGER;lHandle: ListHandle): INTEGER;
  100.     INLINE $3F3C,$0004,$A9E7;
  101. FUNCTION LAddRow(count: INTEGER;rowNum: INTEGER;lHandle: ListHandle): INTEGER;
  102.     INLINE $3F3C,$0008,$A9E7;
  103. PROCEDURE LDelColumn(count: INTEGER;colNum: INTEGER;lHandle: ListHandle);
  104.     INLINE $3F3C,$0020,$A9E7;
  105. PROCEDURE LDelRow(count: INTEGER;rowNum: INTEGER;lHandle: ListHandle);
  106.     INLINE $3F3C,$0024,$A9E7;
  107. FUNCTION LGetSelect(next: BOOLEAN;VAR theCell: Cell;lHandle: ListHandle): BOOLEAN;
  108.     INLINE $3F3C,$003C,$A9E7;
  109. FUNCTION LLastClick(lHandle: ListHandle): Cell;
  110.     INLINE $3F3C,$0040,$A9E7;
  111. FUNCTION LNextCell(hNext: BOOLEAN;vNext: BOOLEAN;VAR theCell: Cell;lHandle: ListHandle): BOOLEAN;
  112.     INLINE $3F3C,$0048,$A9E7;
  113. FUNCTION LSearch(dataPtr: Ptr;dataLen: INTEGER;searchProc: ProcPtr;VAR theCell: Cell;
  114.     lHandle: ListHandle): BOOLEAN;
  115.     INLINE $3F3C,$0054,$A9E7;
  116. PROCEDURE LSize(listWidth: INTEGER;listHeight: INTEGER;lHandle: ListHandle);
  117.     INLINE $3F3C,$0060,$A9E7;
  118. PROCEDURE LDoDraw(drawIt: BOOLEAN;lHandle: ListHandle);
  119.     INLINE $3F3C,$002C,$A9E7;
  120. PROCEDURE LScroll(dCols: INTEGER;dRows: INTEGER;lHandle: ListHandle);
  121.     INLINE $3F3C,$0050,$A9E7;
  122. PROCEDURE LAutoScroll(lHandle: ListHandle);
  123.     INLINE $3F3C,$0010,$A9E7;
  124. PROCEDURE LUpdate(theRgn: RgnHandle;lHandle: ListHandle);
  125.     INLINE $3F3C,$0064,$A9E7;
  126. PROCEDURE LActivate(act: BOOLEAN;lHandle: ListHandle);
  127.     INLINE $3F3C,$0000,$A9E7;
  128. PROCEDURE LCellSize(cSize: Point;lHandle: ListHandle);
  129.     INLINE $3F3C,$0014,$A9E7;
  130. FUNCTION LClick(pt: Point;modifiers: INTEGER;lHandle: ListHandle): BOOLEAN;
  131.     INLINE $3F3C,$0018,$A9E7;
  132. PROCEDURE LAddToCell(dataPtr: Ptr;dataLen: INTEGER;theCell: Cell;lHandle: ListHandle);
  133.     INLINE $3F3C,$000C,$A9E7;
  134. PROCEDURE LClrCell(theCell: Cell;lHandle: ListHandle);
  135.     INLINE $3F3C,$001C,$A9E7;
  136. PROCEDURE LGetCell(dataPtr: Ptr;VAR dataLen: INTEGER;theCell: Cell;lHandle: ListHandle);
  137.     INLINE $3F3C,$0038,$A9E7;
  138. PROCEDURE LFind(VAR offset: INTEGER;VAR len: INTEGER;theCell: Cell;lHandle: ListHandle);
  139.     INLINE $3F3C,$0034,$A9E7;
  140. PROCEDURE LRect(VAR cellRect: Rect;theCell: Cell;lHandle: ListHandle);
  141.     INLINE $3F3C,$004C,$A9E7;
  142. PROCEDURE LSetCell(dataPtr: Ptr;dataLen: INTEGER;theCell: Cell;lHandle: ListHandle);
  143.     INLINE $3F3C,$0058,$A9E7;
  144. PROCEDURE LSetSelect(setIt: BOOLEAN;theCell: Cell;lHandle: ListHandle);
  145.     INLINE $3F3C,$005C,$A9E7;
  146. PROCEDURE LDraw(theCell: Cell;lHandle: ListHandle);
  147.     INLINE $3F3C,$0030,$A9E7;
  148.  
  149. {$ENDC}    { UsingLists }
  150.  
  151. {$IFC NOT UsingIncludes}
  152.     END.
  153. {$ENDC}
  154.  
  155.